/*
 * Misc.hpp
 *
 *  Created on: 08.05.2014
 *      Author: philipp
 */

#ifndef MISC_HPP_
#define MISC_HPP_

#include <string>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <iomanip>
#include <ctime>

/*
 * various helper functions.
 */
namespace misc {

const bool debug = false;
#define DEBUG_OUTPUT(MESSAGE) if(misc::debug){(MESSAGE);}

/**
 * checks if a string has the specified ending.
 */
bool stringEndsWith(const std::string &, const std::string &);

/*
 * transposes a matrix and returns a completely new matrix object.
 */
cv::Mat exchangeRowsWithColumns(const cv::Mat &input);

/*
 * prints a matrix, but just displays up to 2 decimals for better readability.
 */
std::ostream &printMatrix(const cv::Mat &, std::ostream &steam = std::cout);

/*
 * returns the current time and date as formatted string.
 */
std::string currentTimeAsString();

}

#endif /* MISC_HPP_ */
